<html>
<head>
<meta charset="utf-8">
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
<title></title>
<style>
	.ball{
		/* absolute 绝对 relative 相对 */
		position: absolute;
		background:blueviolet;
		width: 40px;
		height: 40px;
		border-radius:50px;
		top: 200px;
		left: 100px;
	}
</style>
</head>
<body>
	<div id="app">
		
		<button id="move">移动</button>
		<div class="ball"></div>
	</div>
	<script>
		//入口函数
		$(function(){
			$('#move').click(function(){
				var params={width:'100px',height:'100px',left:'200px',top:'100px'}
				
				var settings=$.speed(2000,'linear')
				$('.ball').animate(params,settings);
			})
			
		})
	</script>
</body>
</html>
